import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)

import {state,mutations,getters} from './mutations'
import actions from './actions'

import menu from './modules/menu'
import role from './modules/role'
import manager from './modules/manager'

// 得到store仓库
export default new Vuex.Store({
  //存储数据
  state,
  // 只操作数据
  mutations,
  //对接组件中辅助函数 mapActions
  actions,
  // 对接组件中辅助函数 mapGetters
  getters,
  // 模块
  modules:{
    menu,
    role,
    manager,
  }
})
